<%-- 
    Document   : showStock
    Created on : 18-jul-2013, 23:44:09
    Author     : General
--%>

<!doctype html>


<html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<jsp:include page="header.jsp">
    <jsp:param name="title" value="Show Stock" />
</jsp:include>

<body>
    <div id="main" class="container">
        <div id="title" class="row">
            <h1>Symbol: ${stock.symbol}</h1>
            <h3 style="color: green">Ultimo precio: ${stock.symbol}</h3>
        </div>
        <hr/>
        <div id="graphic">
            <object width="824" height="516" type="application/x-shockwave-flash" id="yfi_chart_swf" data="http://l.yimg.com/bm/lib/fi/common/p/d/static/swf/2.0.253765/2.0.0/en-US/largechart.swf" style="visibility: visible; height: 535px;">
                <param name="allowscriptaccess" value="always"><param name="wmode" value="opaque">
                <param name="flashvars" value="sigDevEnabled=true&amp;changeSymbolEnabled=false&amp;state=symbol=${stock.symbol};range=1y;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;">
            </object>
        </div>
        <hr/>
        <div class="container">
            <div class="row">
               <%-- <c:if test="${!empty stock}"> --%>
                    <h3>Data</h3>
                    <%-- <h3>Stock ${stock.symbol}</h3> --%>
                    <table class="table table-bordered table-striped">
                        <tbody>
                            <tr>
                                <td><div>Name: ${stock.name}</div></td>
                            </tr>
                            <tr>                       
                                <td><div>Symbol: ${stock.symbol}</div></td>
                            </tr>
                            <tr>
                                <td><div>Desc: ${stock.sumary}</div></td>
                            </tr>
                        </tbody>
                    </table>
<%--
                    <table class="table table-bordered table-striped">
                        <thead>
                            <tr>
                                <th>Date</th>
                                <th>openPrice</th>
                                <th>highPrice</th>
                                <th>lowPrice</th>
                                <th>closePrice</th>
                                <th>volume</th>
                                <th>adjustedClosePrice</th>
                            </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${stockPriceDao}" var="stockPrice">
                            <tr>
                                <td>${stockPrice.priceDate}</td>
                                <td>${stockPrice.openPrice}</td>
                                <td>${stockPrice.highPrice}</td> 
                                <td>${stockPrice.lowPrice}</td> 
                                <td>${stockPrice.closePrice}</td> 
                                <td>${stockPrice.volume}</td> 
                                <td>${stockPrice.adjustedClosePrice}</td> 
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </c:if>
--%>
            </div>
        </div>
    </div><!-- id="main" -->
</body>
</html>